package own.stu.jobgib.playown.redis.redisson;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;

public class DnsResolverTest {

    public static void main(String[] args) {
        // 1. Create config object
        Config config = new Config();
        config.useSingleServer()
                .setTimeout(10 * 60 * 1000)
                .setConnectTimeout(10 * 60 * 1000)
                // use "rediss://" for SSL connection
                .setAddress("redis://rediss.server:6379"); // 修改hosts文件
//                .setAddress("redis://192.168.31.88:6379");
//                .setAddress("redis://192.168.31.44:7181");
//                .setAddress("redis://192.168.31.53:7181");
        // Sync and Async API
        RedissonClient redisson = Redisson.create(config);
        redisson.getSet("set1").add("2");
    }
}
